<!DOCTYPE html>
<html lang="zh-cmn-Hans" class="pc-wrap">
<head>
    <meta charset="UTF-8">
    <title>法意11日8晚游</title>
    <meta name="keywords" content="法意11日8晚游">
    <meta name="description" content="快来查看为您精心定制的旅行线路吧">

    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-touch-fullscreen" content="YES">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!-- 导入jQuery框架。 -->
    <script type="text/javascript" src="./js/vendor/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="./js/vendor/jquery.pjax.js"></script>

    <!--<script type="text/javascript" src="//ubsrc.cdn.mioji.com/mjplush5/app/lib/zepto.js"></script>-->
    <!--<script type="text/javascript" src="//ubsrc.cdn.mioji.com/mjplush5/app/lib/MJFullPage.js"></script>-->

    <link href="./css/gmap.css" rel="stylesheet">
    <link href="./css/style.css" rel="stylesheet">
    <link href="../resource/css/vj-weui.css" rel="stylesheet">

</head>
<body>
    <!-- 微信分享图片 -->
    <!--<div id="weixin-share-img-wrap" style="overflow:hidden; width:0px; height:0; margin:0 auto; position:absolute; top:-8000px;">-->
    <!--<img src="https://mioji-mobilepic.cdn.mioji.com/10001_1.jpg@base@tag=imgScale&amp;h=500&amp;w=750&amp;rotate=0&amp;c=1&amp;m=2" id="weixin-share-img">-->
    <!--</div>-->
    <script>
        var WO = WO || {};
        WO.ptid = "6pga";
        WO.loading = "https://mioji-blogo.cdn.mioji.com/loading.gif"
    </script>

    <div id="app">
        <div class="h100 journey-container">
            <div class="h100">
                <div class="journey-content">
                    <!--详细内容-->
                    <div class="journey-detail">
                        <div class="header" id="survey-top">
                            <div class="mj-img-box">
                                <img
                                    src="https://mioji-mobilepic.cdn.mioji.com/10001_1.jpg@base@tag=imgScale&amp;h=500&amp;w=750&amp;rotate=0&amp;c=1&amp;m=2">
                                <img
                                    src="https://mioji-mobilepic.cdn.mioji.com/10001_1.jpg@base@tag=imgScale&amp;h=500&amp;w=750&amp;rotate=0&amp;c=1&amp;m=2"
                                    style="display: none;">
                            </div>
                            <p class="by-mioji bg_topicColor">妙计·为您定制</p>
                        </div>
                        <div class="survey-info">
                            <div class="inner">
                                <h3 class="title">法意11日8晚游</h3>
                                <p class="tp">
                                    <span class="date">1月24日-2月3日</span>
                                    <span class="day">11天</span>
                                    <span class="people">2人</span>
                                </p>
                            </div>
                        </div>
                        <div class="survey-detail" id="trip-detail"><!--react-text: 27-->
                            <div class="overview" id="survey-overview">
                                <h3 class="overview-title main-title">行程概览</h3>
                                <div class="overview-img-wrap" id="overview-map-img">
                                    <img
                                        src="https://mioji-private.cdn.mioji.com/map/njlepnjh5a1fe4437676enj38621qdf2.png"
                                        alt="">
                                </div>
                                <div class="overview-wrap"></div>
                            </div>
                            <p class="title main-title" id="title">详细行程</p>
                            <div class="route-detail"></div>
                            <div class="company">
                                <img src="https://mioji-blogo.cdn.mioji.com/mioji.png" alt="">
                            </div>
                        </div>
                    </div>

                    <!--菜单-->
                    <div class="survey-menu close">
                        <div class="menu">
                            <h3 class="title">法意11日8晚游</h3>
                            <div class="menu-container">
                                <div class="menu-item">
                                    <p class="menu-item-text bf_topicColor">回到顶部</p>
                                </div>
                                <div class="menu-item">
                                    <p class="menu-item-text bf_topicColor">行程概览</p>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D1</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">深圳 -</span>
                                            <span class="city over-hide">巴黎</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D2</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">巴黎</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D3</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">巴黎</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D4</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">巴黎 -</span>
                                            <span class="city over-hide">里昂</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D5</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">里昂 -</span>
                                            <span class="city over-hide">尼斯</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D6</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">尼斯</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D7</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">尼斯 -</span>
                                            <span class="city over-hide">威尼斯</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D8</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">威尼斯</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D9</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">威尼斯 -</span>
                                            <span class="city over-hide">米兰</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight false">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D10</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">米兰 -</span>
                                            <span class="city over-hide">深圳</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="menu-item clickedWithoutHighlight last-menu-item">
                                    <div class="menu-item-text bf_topicColor">
                                        <span class="menu-point"></span>
                                        <span class="day">D11</span>
                                        <p class="city-wrap">
                                            <span class="city over-hide">深圳</span>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="menu-btn close">
                            <i class="iconfont icon-icon_xudian"
                               style="color: rgb(255, 255, 255); font-size: 20px;"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--运行时会直接走的JavaScript方法，此处进行jQuery ajax请求-->
    <script>
        $.ajax({
            type: "get",
            url: './json/trip.json',
            dataType: 'json',
            success: function (data) {
                summary = data['data']['summary'];
                // 图片路径
                path = summary['img'] + '@base@tag=imgScale&amp;h=500&amp;w=750&amp;rotate=0&amp;c=1&amp;m=2';
                $('.img.mj-img-box').attr('src', path);

                // 标题
                $(".inner").find(".title").html(summary['title']);

                // 出游截止时间
                var deptDate = summary['deptDate'];
                var backDate = summary['backDate'];
                var newDeptDateStamp = insert_flg(deptDate, '月', '日');
                var newBackDateStamp = insert_flg(backDate, '月', '日');
                dateStr = newDeptDateStamp + '-' + newBackDateStamp;
                $(".tp").find(".date").html(dateStr);

                // 出游天数
                $(".tp").find(".day").html(summary['dur'] + '天');

                // 出游人数
                var people = Number(summary['adults']) + Number(summary['child']);
                $(".tp").find(".people").html(people + '人');


                // 地图图片
                mapPath = summary['mapImage'];
                $('#overview-map-img').attr('src', mapPath);

                <!--overview-item 行程概览-->
                var overviewItemArray = summary['dest'];

                <!--根据ID去查城市-->
                var cityArray = summary['city'];
                var cityDic = createLookMap(cityArray);

                <!--根据下标生成ABCD-->
                var character = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "X", "Y", "Z");
                var overviewItem = $('<div class="overview-item"><div class="city bf_topicColor"><span class="w">A.</span><span class="c over-hide">巴黎</span></div> <p class="day">D2-4</p></div>');
                var tempDay = 0;
                for (var i = 0; i < overviewItemArray.length; i++) {
                    overviewItem.clone().appendTo($('.overview-wrap'));
                    $('.overview-wrap>div').eq(i).find('.w').html(character[i] + '.');
                    var cityKey = summary['dest'][i]['place'];
                    $('.overview-wrap>div').eq(i).find('.c').html(cityDic[cityKey]);
                    var firstDay;
                    if (i == 0) {
                        tempDay = 2
                    }
                    firstDay = tempDay;
                    lastDay = Number(summary['dest'][i]['night']) + firstDay;
                    $('.overview-wrap>div').eq(i).children('.day').text('D' + firstDay + '-' + lastDay);
                    tempDay = lastDay;
                }

                <!--下方列表iTems-->

                <!--iTems个数列表-->
                routeDay = data['data']['routeDay'];
                quoteContent = data['data']['quoteContent'];

                <!--itemfirst样式-->
                var detailSummary = $('');

                <!--itemsecond样式-->
                var detailCityWrap = $('<div class="detail-city-wrap"> </div>');

                <!--itemsecond线条样式-->
                var lineContainerNoLine = $('<div class="line-container no-line"></div>');
                var lineContainer = $('<div class="line-container "><div class="view"> </div></div>');

                <!--深圳乘坐飞机前往巴黎-->
                var traffic = $('<div class="traffic"> <div class="traffic-logo"><i class="iconfont icon-icon_plane  "style="color: rgb(128, 128, 128); font-size: 20px;"></i> </div> <div class="traffic-info"><p class="route sub-title">深圳乘坐飞机前往巴黎</p> <div class="reference"><p class="reference-text">参考：</p> <div class="reference-info"><p class="corp">中国国际航空 </p> <p class="terminal" style="padding-right: 0px;"> CA4384</p> <p class="deng">等</p> <p class="dur">17h 25m</p></div> </div> </div> </div>');

                <!--入住巴黎的酒店-->
                var hotel = $('<div class="hotel"><div class="hotel-logo"><i class="iconfont icon-icon_hotel  " style="color: rgb(128, 128, 128); font-size: 19px;"></i></div><div class="hotel-info"><p class="name sub-title">入住米兰的酒店</p><p class="reference-hotel">参考：米兰4星郊外酒店</p></div></div>');
                <!--图文混排viewItem-->
                var viewItem = $('<div class="view-item"><div class="view-inner clickedWithoutHighlight"><div class="view-info"><div class="view-info-text"><div class="name sub-title 2">斯基亚沃尼滨河大街</div><div class="lname">Riva degli Schiavoni</div><div class="dur"><div><span class="view-type">游玩</span><span class="view-dur">1h</span></div></div></div><div class="view-detail-arrow"><i class="iconfont icon-pright  " style="color: rgb(194, 194, 194); font-size: 12px;"></i></div></div><div class="view-img-wrap"><img src="https://mioji-attr.cdn.mioji.com/v200390_54.jpg@base@tag=imgScale&amp;h=315&amp;w=560&amp;rotate=0&amp;c=1&amp;m=2" alt=""></div><p class="view-intro">得名于在此停泊船只的达尔马提亚商人，是一条弯曲绵延的散步街道。在此拍摄叹息桥和圣乔治.巴焦雷岛特别合适。</p></div></div>')

                // 最后一个viewitem
                var viewItemLast = $('<div class="view"><div class="view-item   "><div class="view-inner special-view-inner"><div class="view-info"><div class="name sub-title surveyOver">旅途结束</div></div></div></div></div>');
                for (var j = 0; j < routeDay.length; j++) {
                    var item = routeDay[j];
                    var indexD = j + 1;
                    var dayId = 'day' + indexD;
                    var tempCArray = new Array();
                    var trafficType;
                    $(item['cityShow']).each(function (index, objct) {
                        tempCArray.push(objct['name']);
                        if (objct['traffic']) {
                            if (objct['traffic'] == 'flight') {
                                trafficType = '乘坐飞机';
                            } else if (objct['traffic'] == 'driving') {
                                trafficType = '驾车';
                            }
                        }
                    });
                    var place = tempCArray.join('-');
                    var subTitle = tempCArray.join(trafficType + '前往');
                    var detailItem = $('<div class="detail-item " id="' + dayId + '" >' + '<div class="detail-summary">' + '<div class="day bg_topicColor">' + 'D' + indexD + '</div> <div class="cd">' + '<p class="c topicColor over-hide">' + place + '</p>' + '<p class="d topicColor">' + '<span class="date">' + item['date'] + '</span>' + '<span class="week">' + '周' + item['week'] + '</span>' + '</p>' + '</div>' + '</div>' + '<div class="detail-city-wrap">' + '</div>' + '</div>');
                    detailItem.click(function () {
                        $.pjax({
                            url: 'indexdetails.html',
                            container: '.route-detail'
                        });
                        $(document).on('pjax:send', function () {
                        });
                        $(document).on('pjax:complete', function () {
                        });
                    });
                    detailItem.appendTo($('.route-detail'));

                    <!--说明有traffic-->
                    if (item['city'][0]['traffic']) {
                        lineContainerNoLine.clone().appendTo($('#' + dayId + '').children('.detail-city-wrap'));
                        traffic.clone().appendTo($('#' + dayId + '').find('.line-container'));
                        $('#' + dayId + '').find('.route').html(subTitle);
                        if (trafficType == '乘坐飞机') {
                            $('#' + dayId + '').find('.corp').html(quoteContent['traffic']['list'][0]['tickets'][0]['section'][0]['corp']);
                            $('#' + dayId + '').find('.terminal').html(quoteContent['traffic']['list'][0]['tickets'][0]['section'][0]['no']);
                            $('#' + dayId + '').find('.dur').html(MillisecondToDate(quoteContent['traffic']['list'][0]['tickets'][0]['dur']));
                        } else {
                            $('#' + dayId + '').find('.corp').html('驾车');
                            $('#' + dayId + '').find('.terminal').html('');
                            $('#' + dayId + '').find('.deng').html('');
                            $('#' + dayId + '').find('.dur').html(MillisecondToDate(quoteContent['traffic']['list'][0]['tickets'][0]['dur']));
                        }
                    }
                    <!--说明有view-->
//                var cityModel
//                var iscity = false
//                var cityModelArray = item['city']
//                var iscity = false
//                if (cityModelArray.length <= 0) {
//                    iscity = false
//                } else if (cityModelArray.length < 2) {
//                    if (item['city'][0]['view'])
//                    {
//                        cityModel = item['city'][0]['view']['day']['view']
//                        iscity = true
//                    }else {
//                        iscity = false
//                    }
//                } else {
//                    if (item['city'][cityModelArray.length - 1]['view']['day']['view'])
//                    {
//                        cityModel = item['city'][cityModelArray.length - 1]['view']['day']['view']
//                        iscity = true
//                    }else {
//                        iscity = false
//                    }
//                }

                    if (item['city'][0]['view']) {
                        var viewDaysArray = item['city'][0]['view']['day']['view'];
                        lineContainer.clone().appendTo($('#' + dayId + '').children('.detail-city-wrap'));
                        for (var v = 0; v < viewDaysArray.length; v++) {
                            viewObject = viewDaysArray[v];
                            viewItem.clone().appendTo($('#' + dayId + '').find('.view'));
                            <!--此处有bug需要找到对应动态view-item-->
//                            $('#' + dayId + '').find('view-item:eq(v)').find('.name').html(viewObject['name']);
                            $('#' + dayId + '').find('.lname').html(viewObject['lname']);
                            $('#' + dayId + '').find('.view-type').html(viewObject['doWhat']);
                            $('#' + dayId + '').find('.view-dur').html(MillisecondToDate(viewObject['dur']));
                            $('#' + dayId + '').find('.view-type').html(viewObject['doWhat']);
                            $('#' + dayId + '').find('.view-intro').html(viewObject['intro']);
                            viewImgPath = viewObject['img'] + '@base@tag=imgScale&h=315&w=560&rotate=0&c=1&m=2';
                            $('#' + dayId + '').find('.view-img-wrap').attr('src', viewImgPath);
                        }
                    }

                    <!--说明有酒店-->
                    var hotelArray = item['city'];
                    var hotelModel;
                    var isHotel = false;
                    if (hotelArray.length <= 0) {
                        isHotel = false;
                    } else if (hotelArray.length < 2) {
                        hotelModel = item['city'][0]['hotel'];
                        isHotel = true;
                    } else {
                        console.log(j + '---' + hotelArray.length);
                        hotelModel = item['city'][hotelArray.length - 1]['hotel'];
                        isHotel = true;
                    }

                    if (isHotel == true && hotelModel) {
                        hotel.clone().appendTo($('#' + dayId + '').find('.line-container'));
//                    $('#' + dayId + '').find('.lname').html(viewObject['lname'])
                    }
                    <!--最后一排-->
                    if (j == routeDay.length - 1) {
                        lineContainerNoLine.clone().appendTo($('#' + dayId + '').children('.detail-city-wrap'));
                        viewItemLast.clone().appendTo($('#' + dayId + '').find('.line-container'));
                    }

                }
                companyPath = data['data']['partnerInfo']['logo'];
                $('#trip-detail').find('.company ').attr('src', companyPath);
            }
        })
    </script>

    <script>
        <!--拼接日期格式-->
        function insert_flg(str, month, day) {
            var deptDateStamp = str.substr(4, 4);
            var strF = deptDateStamp.substr(0, 2);
            var strB = deptDateStamp.substr(2, 2);
            var newStr = strF + '月' + strB + '日';
//            console.log(newStr)
            return newStr;
        }
    </script>

    <script>
        <!--秒转换-->
        function MillisecondToDate(msd) {
            var time = parseFloat(msd);
            if (null != time && "" != time) {
                if (time > 60 && time <= 60 * 60) {
                    time = parseInt(time / 60.0) + "分钟";
                }
                else if (time > 60 * 60 && time <= 60 * 60 * 24) {
                    time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) -
                        parseInt(time / 3600.0)) * 60) + "分钟";
                }
                else {
                    time = parseInt(time) + "秒";
                }
            }
            return time;
        }
    </script>

    <script>
        <!--根据cityID动态查城市-->
        function createLookMap(jsonArr) {
            var map = {};
            for (var i = 0; i < jsonArr.length; i++) {
                var item = jsonArr[i];
                map[item['cid']] = item['name'];
            }
            return map;
        }

    </script>

    <!--侧边栏点击事件-->
    <script>
        $(".menu-btn").click(function () {
            $('.survey-menu').toggleClass('open').toggleClass('close');
        })
    </script>

    <!--menu点击事件跳转-->
    <script>
        $('.menu-item').click(function () {
            <!--header-->
            if ($(this).index() == 0) {
                window.location.hash = "#survey-top";
                return;
            }
            <!--第一个-->
            if ($(this).index() == 1) {
                window.location.hash = "#survey-overview";
                return;
            }
            var index = $(this).index() - 2;
            var dayNumber = '#' + 'day' + index;
            window.location.hash = dayNumber;
            $('.survey-menu').toggleClass('open').toggleClass('close');
        })
    </script>

    <!--点击map跳转-->
    <script>
        $(function () {
            $(".detail-item ").click(function () {
                $.pjax({
                    url: 'indexdetails.html',
                    container: '.route-detail'
                });
                $(document).on('pjax:send', function () {
                });
                $(document).on('pjax:complete', function () {
                });
            })
        })
    </script>
    <!-- 判断手机运行环境begin -->
    <script type="text/javascript">
        var browser = {
            versions: function () {
                var u = navigator.userAgent, app = navigator.appVersion;
                return {         //移动终端浏览器版本信息
                    trident: u.indexOf('Trident') > -1, //IE内核
                    presto: u.indexOf('Presto') > -1, //opera内核
                    webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
                    gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
                    mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
                    ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                    android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
                    iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
                    iPad: u.indexOf('iPad') > -1, //是否iPad
                    webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
                };
            }(),
            language: (navigator.browserLanguage || navigator.language).toLowerCase()
        };
        if (browser.versions.mobile) {//判断是否是移动设备打开。browser代码在下面
            var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
            if (ua.match(/MicroMessenger/i) == "micromessenger" && browser.versions.ios) {
                //在微信中打开
                document.body.className = "weixin";
            }
            if (ua.match(/WeiBo/i) == "weibo") {
                //在新浪微博客户端打开
            }
            if (ua.match(/QQ/i) == "qq" && ua.match(/Android/i) == 'android' && ua.match(/MicroMessenger/i) != "micromessenger") {
                //在QQ空间打开

            }
            if (ua.match(/QQ/i) == "qq" && ua.match(/Android/i) != 'android') {
                //在QQ空间打开

            }
            if (browser.versions.ios) {
                //是否在IOS浏览器打开
                document.body.className = document.body.className + ' ios-env';
            }
            if (browser.versions.android) {
                //是否在安卓浏览器打开
                document.body.className = "android-env";
            }
        } else {
            //否则就是PC浏览器打开
            document.documentElement.className = "pc-wrap";
        }
    </script>
    <script>
        window.onresize = refreshHtmlFontSize;
        window.onload = refreshHtmlFontSize;

        function refreshHtmlFontSize() {
            var docEl = document.documentElement;
            var width = docEl.getBoundingClientRect().width;
            if (document.body.className.indexOf('pc-wrap') > -1 && width > 680) {
                width = 680;
            }
            var fontSize = width / (375 / 20);
            docEl.style.fontSize = fontSize + 'px';
        }
    </script>

</body>
</html>
